<!--
/* Powered by JYWAP & jy.qhxin.com */
var checkedNav = $("newtalk");
var tBodyId = "",digestId = "tabbodydigesttalk", hotId="tabbodyhottalk";
var LoadPage = new Array();
LoadPage[digestId] = 0;
LoadPage[hotId] = 0;

function checker_cheked(vid) {
	tBodyId = "tabbody"+vid.id;
	checkedNav.className="";
	$("tabbody"+checkedNav.id).style.display = "none";
	vid.className="checher_checked";
	$(tBodyId).style.display = "inline";
	checkedNav = vid;
	if(tBodyId == digestId || tBodyId == hotId) {
		tokenSubInit();
	}
}
var timeHot = 2592000;//30天
var pageSize = 13;
function gotJsonData() {
	if (xmlHttp.readyState==4) {
		var talkList = eval("("+xmlHttp.responseText+")");
		var htmlStr = "", preStr = "";
		if(checkValidOk(talkList)) {
			if(tBodyId == hotId) {
				preStr = "<span class=\"hot\">[热]</span>";
			}else{
				preStr = "<span class=\"jing\">[精]</span>";
			}
			for(i=0;i<talkList.length;i++) {
				htmlStr += "<div class=\"list\"><a href=\"index.php?index-talk-tid-"+talkList[i]["tid"]+".htm\">"+preStr+talkList[i]["title"]+"("+talkList[i]["tj"]+"/"+talkList[i]["rtj"]+")</a></div>"
			}
			LoadPage[tBodyId]++;
		}else{
			htmlStr += "<div class=\"list\"><a>暂无数据</a></div>";
		}
		$(tBodyId).innerHTML = htmlStr;
	}
}
function getToken() {
	if (xmlHttp.readyState==4) {
		ajaxToken = eval("("+xmlHttp.responseText+")");
		if(ajaxToken!="") {
			var url = "";
			if(tBodyId == hotId) {
				url = "index.php?app-hottalklist-token-"+ajaxToken+"-time-"+timeHot+"-limit-"+pageSize+".htm";
			}else if(tBodyId == digestId) {
				url = "index.php?app-digesttalklist-token-"+ajaxToken+"-limit-"+pageSize+".htm";
			}
			if(url!="") getJsonData(url, gotJsonData);
		}
	}
}
function tokenSubInit() {
	if(LoadPage[tBodyId]==0){
		getJsonData("index.php?app-token-key-"+CS_KEY+".htm", getToken);
	}
}
-->